﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<!--Head-->
<head>
	<title>登录 - <?=$site->name ?></title>
	<?php $this->load->view( 'common/header' )?>
</head>
<!--Head Ends-->
<!--Body-->
<body>
    <div class="login-container animated fadeindown">
    	<form id="login">
        <div class="loginbox bg-white">
            <div class="loginbox-title bordered-bottom-2 bordered-darkorange"><?=$site->name?></div>

	        <div id="error"></div>

            <div class="loginbox-textbox">
                <input type="text" class="form-control" id="sid" placeholder="学号" />
            </div>
            <div class="loginbox-textbox">
                <input type="test" class="form-control" id="sname" placeholder="姓名" />
            </div>

            <div class="loginbox-submit">
                <button type="submit" id="login" class="btn btn-lg  btn-primary btn-block">登录</button>
            </div>
        </div>
        </form>
        <div class="logobox">
	        技术支持：<a href="http://www.wfweilan.com">蔚蓝工作室</a>
        </div>
    </div>

<?php $this->load->view( 'footer'); ?>
<script>
$("#login").bind("submit", function(e){
    $.post(
	    '<?=site_url('login/login_check')?>',
	    {
		    sid:$('#sid').val(),sname:$('#sname').val()
	    },
	    function( json ){
		    //error_clear();
		    data = eval( '(' + json + ')' );
		    if( data.status == 'error' ){
			    error( 'warning', data.error );
		    }else{
			    //error( 'success', data.error );
			    window.location.href= "<?=site_url( '/exam/exam_tips')?>";
		    }
	    }
    );
    return false;
});

</script>

</body>
<!--Body Ends-->
</html>
